/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package GUI;

import MouseSensorDriver.Calibrator;
import adc_lcard.ADCE140Driver;
import dynamixel.EndoscopeGear;
import java.io.Serializable;

/**
 *
 * @author Asko
 */
public class EndoscopeChannel implements Serializable{
    int adcNum = 0 ;
    EndoscopeGear  gear ;
    int calibChannelPos = 0 ;
    int calibChannelTorque = 0;
    

    public EndoscopeChannel(EndoscopeGear gear, int adcNum,
            int calibChannelPos, int calibChannelTorque) {
        this.gear = gear;
        this.adcNum = adcNum;
        this.calibChannelPos = calibChannelPos ;
        this.calibChannelTorque = calibChannelTorque ;
    }

    public EndoscopeGear getGear() {
        return gear;
    }
    
    public double getAdcData() {
        return Calibrator.get().getData(calibChannelPos, ADCE140Driver.getDiffData(adcNum));
    }
     public double getAdcData(int val) {
        return Calibrator.get().getData(calibChannelPos, val);
    }
    
     public int getAdcSourceData() {
        return  ADCE140Driver.getDiffData(adcNum);
     }
     
     public double getTorqueData() {
        return Calibrator.get().getData(calibChannelTorque,
                ADCE140Driver.getDiffData(adcNum));
    }
     public double getTorqueData(int val) {
        return Calibrator.get().getData(calibChannelTorque, val);
    }
    
     public int getTorqueSourceData() {
        return  ADCE140Driver.getDiffData(adcNum);
     }
}
